import unittest

from tinydb.sql.parser.ast import ASTNode

class TestASTNode(ASTNode):
    def __init__(self, name, email):
        super().__init__()
        self.name = name
        self.email = email

class TestAST(unittest.TestCase):
    def test_print_ast_node(self):
        t = ASTNode()
        self.assertEqual(str(t), '<ASTNode>')
        t = TestASTNode('John', 'john@example.com')
        self.assertEqual(str(t), "<TestASTNode> name='John' email='john@example.com'")
    

if __name__ == '__main__':
    unittest.main()
